﻿namespace UFIDA.U9.WSS.ProxyService.Exceptions
{
    /// <summary>
    ///     异常代码
    /// </summary>
    public static class ExceptionCodes
    {
        /// <summary>
        ///     执行成功
        /// </summary>
        public const int Success = 2000;

        #region 其它异常

        /// <summary>
        ///     未知异常
        /// </summary>
        public const int UnKnownException = -1000;

        /// <summary>
        ///     服务配置异常
        /// </summary>
        public const int ServiceConfigurationException = -1001;

        #endregion

        #region 服务请求异常

        /// <summary>
        ///     服务异常基础编码
        /// </summary>
        public const int ServiceExceptionBaseCode = -2000;

        /// <summary>
        ///     请求格式异常
        /// </summary>
        public static int ServiceRequestBodyFormatException = ServiceExceptionBaseCode - 1;

        /// <summary>
        ///     请求数据格式异常
        /// </summary>
        public static int ServiceRequestDataFormatException = ServiceExceptionBaseCode - 2;

        /// <summary>
        ///     用户未认证异常
        /// </summary>
        public static int ServiceUserNotAuthenticated = ServiceExceptionBaseCode - 3;

        /// <summary>
        ///     请求动作不存在
        /// </summary>
        public const int ServiceOperationIsNotExist = ServiceExceptionBaseCode - 4;

        #endregion

        #region Context

        /// <summary>
        ///     上下文异常基础编码
        /// </summary>
        public const int ContextExceptionBaseCode = -3000;

        /// <summary>
        ///     上下文信息不能为空
        /// </summary>
        public static int ContextInfoNull = ContextExceptionBaseCode - 1;

        /// <summary>
        ///     上下文信息不完整
        /// </summary>
        public static int ContextInfoIncomplete = ContextExceptionBaseCode - 2;

        /// <summary>
        ///     企业存在
        /// </summary>
        public static int ContextEnterpriseIDNotExist = ContextExceptionBaseCode - 3;

        /// <summary>
        ///     组织不存在
        /// </summary>
        public static int ContextOrgCodeNotExist = ContextExceptionBaseCode - 4;

        /// <summary>
        ///     用户不存在
        /// </summary>
        public static int ContextUserCodeNotExist = ContextExceptionBaseCode - 5;

        /// <summary>
        ///     用户密码认证失败
        /// </summary>
        public static int ContextUserPasswordAuthFail = ContextExceptionBaseCode - 6;

        /// <summary>
        ///     用户已禁用
        /// </summary>
        public static int ContextUserIsNoAlive = ContextExceptionBaseCode - 7;

        /// <summary>
        ///     企业为Null
        /// </summary>
        public static int ContextEnterpriseNull = ContextExceptionBaseCode - 8;

        #endregion

        #region Token

        /// <summary>
        ///     Token异常基础编码
        /// </summary>
        public const int TokenExceptionBaseCode = -4000;

        /// <summary>
        ///     Token不能为空
        /// </summary>
        public static int TokenIsInEmpty = TokenExceptionBaseCode - 1;

        /// <summary>
        ///     Token无效
        /// </summary>
        public static int TokenIsIncorrect = TokenExceptionBaseCode - 2;

        /// <summary>
        ///     Token已失效
        /// </summary>
        public static int TokenIsInvalid = TokenExceptionBaseCode - 3;

        /// <summary>
        ///     Token生成失败
        /// </summary>
        public static int TokenCreateFail = TokenExceptionBaseCode - 4;

        #endregion

        #region 服务调用异常

        /// <summary>
        ///     业务服务异常基础编码
        /// </summary>
        public const int ProxyServiceExceptionBaseCode = -5000;

        /// <summary>
        ///     业务服务调用失败
        /// </summary>
        public const int ProxyServiceCallFail = ProxyServiceExceptionBaseCode - 1;

        /// <summary>
        ///     context数据不正确
        /// </summary>
        public const int ProxyServiceContextDataIsIncorrect = ProxyServiceExceptionBaseCode - 2;

        /// <summary>
        ///     proxy属性不能为空
        /// </summary>
        public const int ProxyServiceProxyPropertyIsEmpty = ProxyServiceExceptionBaseCode - 3;

        /// <summary>
        ///     proxy禁止访问
        /// </summary>
        public const int ProxyServiceProxyAccessDenied = ProxyServiceExceptionBaseCode - 4;

        /// <summary>
        ///     proxy属性不正确
        /// </summary>
        public const int ProxyServiceProxyPropertyIsIncorrect = ProxyServiceExceptionBaseCode - 5;

        #endregion
    }
}